package com.jml.单例模式;


public class 静态代码块 {
    private static 静态代码块 静态代码块 = null;
    private 静态代码块(){

    }
    static {
        System.out.println("当前class被加载");
        静态代码块 = new 静态代码块();
    }
//    init();

    public static 静态代码块 getInstance() {
        return 静态代码块;
    }

    public static void main(String[] args) {
//        Singleton05 instance1 = Singleton05.getInstance();
//        Singleton05 instance2 = Singleton05.getInstance();
//        System.out.println(instance1==instance2);
    }
}
